package com.njxxted.activiti.modules.process.extend.dao;

import com.njxxted.activiti.modules.base.dao.BaseDao;
import com.njxxted.activiti.modules.process.extend.entity.ExtendActHistoryEntity;
import com.njxxted.activiti.modules.process.extend.entity.HistoryTaskInstanceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 描述：扩展流程实例历史表 Dao
 * <p>
 * 作者：HuTongFu
 * 邮箱：hu_tongfu@163.com
 * 时间：2019-08-12 16:58:12
 */
@Mapper
public interface ExtendActHistoryDao extends BaseDao<ExtendActHistoryEntity> {

    /**
     * 根据流程实例id和任务id查询流程历史
     *
     * @param pInstanceId 流程实例id
     * @param taskId      流程任务id
     * @return
     */
    List<HistoryTaskInstanceEntity> queryObjectByPidTid(@Param("pInstanceId") String pInstanceId, @Param("taskId") String taskId);

    /**
     * 根据流程实例id和任务id删除流程历史
     *
     * @param pInstanceId 流程实例id
     * @param taskId      流程任务id
     * @return
     */
    int deleteByPidTid(@Param("pInstanceId") String pInstanceId, @Param("taskId") String taskId);
}
